#include "SyncEvent.h"

SyncEvent::SyncEvent(const char* pName)
{
	_hEvent = CreateEvent(NULL, FALSE, FALSE, pName);
}

SyncEvent::~SyncEvent()
{
	CloseHandle(_hEvent);
}

void SyncEvent::Wait()
{
	WaitForSingleObject(_hEvent, INFINITE);
}

void SyncEvent::Set()
{
	SetEvent(_hEvent);
}